$ceshi = "1417247764"; Time stamp format
First type:
$ceshi +86400;//The time stamp based on one day (i.e. 60*60*24)
The second type: $firstdaystr =date ("y-m-d h:i:s", $ceshi); Format timestamp, turn to normal format 2014-12-18
$end _time=strtotime
There are a variety of ways to get timestamps in PHP, and usually get time is the UNIX timestamp and we normally see the time is not the same, then we need to format this, this article is about PHP gets to the current time and PHP to the UNIX
Can the following code be abbreviated? Is there a simple way to implement the following code? I think it is too complicated to write this code. if I write data for a month, wouldn't I need to write 30 cases for help, I am a newbie & lt ;?
Can the following code be abbreviated? Is there a simple way to implement the following code? I think it is too complicated to write this code. if I write data for a month, wouldn't I need to write 30 cases for help, I am a newbie & lt ;?
The following code can be abbreviated AH?
The following code is not a simple way to achieve ah, I think this is too complicated to write, if you write one months of data, it is not necessary to write 30 case
I'm a novice, I beg the hero's help
Can the following code be abbreviated? Is there a simple way to implement the following code? I think it is too complicated to write this code. if I write data for a month, wouldn't I need to write 30 cases for help, I am a newbie & lt ;?
How does php add a day at a certain time? One hour? Time addition and subtraction
Date_default_timezone_set ('prc'); // Default time zone
Echo "today:", date ("Y-m-d", time ()),"
";
Echo "today:", date ("Y-m-d", strtotime ("18 Jun 2008 ")),"
";
Echo
PHP timestamp Format all summary (get time, timestamp), PHP
There are many kinds of functions in the PHP language, different ways of application, and the functions of implementation are not the same. Hope to learn from the novice to help!
One, the
Gets the specified year date into the timestamp:
PHP timestamp function gets the UNIX timestamp strtotime of the specified date (' 2012-12-7 ')
Examples are as follows:
The code is as follows
Copy Code
There are many kinds of functions in the PHP language, different application methods, the implementation of the function is not the same. Hope to be helpful to the Novice's study!
First, the PHP timestamp function gets the UNIX timestamp strtotime (
PHP Date processing current time plus one year, etc. Summary : PHP date processing current time plus one year, time intervalDate_default_timezone_set (' PRC '); Default time zoneecho "
PHPFor example, today is November 2, 2102, so what does PHP do to get the timestamp of November 2, 2102?Code: Echostrtotime (Date (' y-m-d ')), '';Get the time stamp tomorrow morning.Code: Echostrtotime (Date (' y-m-d ', Strtotime (' +1 Day ')),
In PHP I want to get a timestamp there are many ways, the most common is to use the time function and the strtotime () function to convert the date into a timestamp, I would like to share the time stamp function strtotime usage.
gets the specified
The PHP strtotime function resolves the date-time description of any English text to a UNIX timestamp [converts system time to UNIX timestamp]
First, get the Unix timestamp strtotime ("2009-1-22″" example) for the specified date as follows:
Echo
1.PHP Timestamp function converts a date to a Unix timestamp
World End Time Stamp PHP
The code is as follows
echo "World Doomsday Timestamp:". Strtotime ("2012-12-21")
2. Convert time stamp to system time
In PHP, there is a function called Strtotime. Strtotime implementation: Gets the timestamp of a date, or gets a timestamp of a time. strtotime resolves a date-time description of any English text to a UNIX timestamp [converts system time to UNIX
In PHP, there is a function called Strtotime. Strtotime implementation: Gets the timestamp of a date, or gets a timestamp of a time. strtotime resolves a date-time description of any English text to a UNIX timestamp [converts system time to UNIX
First look at the manual introduction:strtotime-to parse the datetime description of any English text into a Unix timestampFormat: int strtotime (string $time [, int $now])This function expects to accept a string containing the U.S. English date
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.